<template>
  <div class="container">
    <a-tabs :default-active-key="state.activekey" destroy-on-hide lazy-load>
      <a-tab-pane key="2">
        <template #title><icon-file /> 锻造</template>
        <GongYiIndex :key="'GongYiIndex_2'" :gongyitype="state.gongYiType.duanzao"></GongYiIndex>
      </a-tab-pane>
      <a-tab-pane key="3">
        <template #title><icon-file /> 缓冷</template>
        <GongYiIndex :key="'GongYiIndex_3'" :gongyitype="state.gongYiType.huanleng"></GongYiIndex>
      </a-tab-pane>
      <a-tab-pane key="4">
        <template #title><icon-file /> 机加工</template>
        <GongYiIndex :key="'GongYiIndex_4'" :gongyitype="state.gongYiType.jijia"></GongYiIndex>
      </a-tab-pane>
      <a-tab-pane key="1">
        <template #title><icon-file /> 加热</template>
        <GongYiIndex :key="'GongYiIndex_1'" :gongyitype="state.gongYiType.jiare"></GongYiIndex>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>

<script lang="ts" setup>
import {reactive, ref, onMounted, onUnmounted, defineAsyncComponent} from "vue";
import GongYiType from "@/utils/gongYiType";
const GongYiIndex = defineAsyncComponent(() => import('@/views/gongyi/index.vue'));

const state = reactive({
  activekey:"2",
  gongYiType : GongYiType,
})
</script>

<style scoped>

</style>
